Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project: use a choicefield for selecting the versioning scheme #10845

Merged
merged 14 commits into from
Nov 16, 2023

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Oct 18, 2023

We may want to publish a small blog post communicating this change, when updating a project with API v3, versioning_scheme should be used instead of single_version.

This looks like this:

Screenshot from 2023-10-24 18-35-50
Screenshot 2023-10-24 at 18-35-30 Edit Advanced Project Settings Read the Docs

Closes #10781

How to deploy this change

  • Deploy as usual web-extra
  • Run migration 0109 projects
  • Deploy webs
  • Run migration 0110 projects

@stsewd stsewd self-assigned this Oct 19, 2023
@stsewd stsewd marked this pull request as ready for review October 24, 2023 23:36
@stsewd stsewd requested a review from a team as a code owner October 24, 2023 23:36
@stsewd stsewd requested a review from ericholscher October 24, 2023 23:36
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought a part of this project was adding a "single language / multiple version" concept, which makes this language a bit more important to consider. I'm not 100% sure what the right language here is, but seems like we might want to make that change in this PR as well?

MULTI_VERSION = "multi_version"
VERSIONING_SCHEME_CHOICES = (
(SINGLE_VERSION, _("Single version")),
(MULTI_VERSION, _("Multi version")),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry about this language when we introduce Single language projects. It seems like we need a better way to describe these projects that takes into account translations as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, first I named these:

  • Single version, single language
  • Multi version, multi language
  • Multi version, single language (the new option)

But it felt too verbose, and I was hoping that having the preview of each case would clarify things better.

Maybe just re-think this as:

  • Single version without translations
  • Multiple versions with translations
  • Multiple versions without translations (the new option)

Still verbose, but maybe more clear for users that aren't familiar with our language.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think explicit is probably best to start, if there isn't an obvious other way to describe it. I think the main thing is actually explaining the URL path (eg. Multiple versions without translations (/<version>/<file>)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean use a placeholder instead of a live preview? Right now I'm showing how the URL will look like for the project (/latest/file.html, /en/latest/file.html, /projects/en/latest, using their language, subproject prefix, etc)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is great -- I think a live prefix is the most useful way to understand this. On top of that, I think we can just use the explicit naming above,.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, Multiple versions without translations (/<version>/<file>) with a static example is the best explanation. It may be verbose, but it removes all type of confusions.

Even if you don't know what's the meaning of /en/ in the URL, if you want to host documentation in different languages you will select the option that says "... with translations"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with both options, static or dynamic preview.

Copy link
Member

@ericholscher ericholscher Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think static is better since it's more explicit and the user doesn't need to know what en is 👍

@stsewd stsewd requested a review from ericholscher October 26, 2023 20:13

SINGLE_VERSION_WITHOUT_TRANSLATIONS = "single_version_without_translations"
MULTIPLE_VERSIONS_WITH_TRANSLATIONS = "multiple_versions_with_translations"
VERSIONING_SCHEME_CHOICES = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks pretty much done to me, but we still don't have "Single version with translations" or similar in this list. I thought that was part of this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's going to be added in #10766

@ericholscher
Copy link
Member

Seems this is ready to merge -- would be good to get moving so we can get #10766 in as well 💯

@stsewd
Copy link
Member Author

stsewd commented Nov 7, 2023

@ericholscher any preference on #10845 (comment)?

@stsewd stsewd requested a review from a team as a code owner November 16, 2023 16:43
@stsewd stsewd merged commit b5e547d into main Nov 16, 2023
7 checks passed
@stsewd stsewd deleted the add-versioning-scheme branch November 16, 2023 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Project: use a dropdown for multi version/single version/single language options
3 participants